Skip to content

test(ci): guard the Codex auto-resolve missing-token graceful skip#635

Merged
BigSimmo merged 1 commit into
mainfrom
claude/github-actions-codex-issue-f4t4s5
Jul 14, 2026
Merged

test(ci): guard the Codex auto-resolve missing-token graceful skip#635
BigSimmo merged 1 commit into
mainfrom
claude/github-actions-codex-issue-f4t4s5

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up to #610. The graceful skip added there — the request job stays green (warning annotation, not a red check) when CODEX_TRIGGER_TOKEN is unset — had no regression coverage. It could be removed silently, which would turn every Codex review into a failing check on the merged-but-unconfigured workflow. This adds that coverage.

  • Guard (scripts/check-codex-autofix-workflow.mjs): assert the missing-token handling is present — the job-level CODEX_TRIGGER_TOKEN env binding, both step-level if: guards (== '' warn / != '' run), and the warning message.
  • Tests (tests/codex-autofix-workflow.test.ts): two guard-mutation tests that fail if the warning branch or the request step's skip guard is removed.

No workflow behavior change — this is test/guard hardening only.

Verification

  • node scripts/check-codex-autofix-workflow.mjs passes
  • npx vitest run tests/codex-autofix-workflow.test.ts — 30/30 (2 new)
  • eslint + prettier clean on changed files
  • npm run verify:pr-local — N/A: change limited to a CI guard script and its unit tests; no app source, build, or runtime surface touched
  • npm run verify:ui — N/A: no UI/routing/styling/browser change
  • npm run verify:release — N/A: no release/handoff claim

Clinical Governance Preflight

N/A — does not touch ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output. CI guard + tests only.

Notes

  • Supersedes Codex's separate side-PR 5220d6a (same intent); that one can be closed.

🤖 Generated with Claude Code


Generated by Claude Code

Summary by CodeRabbit

  • Tests
    • Added validation to ensure the Codex auto-resolve workflow handles missing trigger tokens gracefully.
    • Added coverage confirming the workflow guard detects missing-token warnings and skipped request conditions.

The graceful skip that keeps the request job green when CODEX_TRIGGER_TOKEN
is unset (job-env binding + step-level if-guards + warning) had no regression
coverage, so it could be silently removed and turn every Codex review into a
red check on a merged-but-unconfigured workflow.

- Assert the missing-token handling (env binding, both if-guards, warning
  message) in scripts/check-codex-autofix-workflow.mjs.
- Add guard mutation tests that fail if the warning branch or the request
  step's skip guard is removed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NrdqyvKzaovZUX9haKfgjM
@supabase

supabase Bot commented Jul 14, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d985a3f1-c4aa-4e26-a6b9-02a72ba42366

📥 Commits

Reviewing files that changed from the base of the PR and between d53e5cc and 47d09d5.

📒 Files selected for processing (2)
  • scripts/check-codex-autofix-workflow.mjs
  • tests/codex-autofix-workflow.test.ts

📝 Walkthrough

Walkthrough

The Codex auto-resolve workflow guard now checks graceful handling of an unset CODEX_TRIGGER_TOKEN. Tests verify the guard fails when the missing-token warning or request-step skip condition is removed.

Changes

Codex token handling guard

Layer / File(s) Summary
Workflow token validation and coverage
scripts/check-codex-autofix-workflow.mjs, tests/codex-autofix-workflow.test.ts
The guard validates required token-binding and conditional snippets, while tests cover removal of missing-token handling branches.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding guard coverage for the Codex auto-resolve missing-token graceful skip.
Description check ✅ Passed The description matches the template with Summary, Verification, Clinical Governance Preflight, and Notes filled with relevant details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/github-actions-codex-issue-f4t4s5

Comment @coderabbitai help to get the list of available commands.

@BigSimmo
BigSimmo marked this pull request as ready for review July 14, 2026 05:13
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@BigSimmo
BigSimmo enabled auto-merge (squash) July 14, 2026 05:13
@BigSimmo
BigSimmo merged commit ab09a8d into main Jul 14, 2026
16 checks passed
@BigSimmo
BigSimmo deleted the claude/github-actions-codex-issue-f4t4s5 branch July 14, 2026 09:42
cursor Bot pushed a commit that referenced this pull request Jul 17, 2026
Static PR checks failed on format:check for the PR #635 ledger row.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Jul 17, 2026
* docs: record post-merge review of PR #635

PR #635 was already squash-merged with green CI and no open review
threads; record the merge-readiness outcome in the branch review ledger.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* style: format branch-review-ledger for Prettier CI

Static PR checks failed on format:check for the PR #635 ledger row.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants